#!/bin/sh

# +++ 变量声明 Start+++
export g_libId="x264"
# 源码path
export g_sourceLibDir=${g_inputRootDir}/${g_libId}
# 脚本path
g_scriptLibDir=${g_scriptArchDir}/${g_libId}
# Buildpath
export g_buildLibDir=${g_buildArchDir}/${g_libId}
if [[ ! -e ${g_buildLibDir} ]]; then
    mkdir -p ${g_buildLibDir}
fi

# Output-库目录
export g_outputLibDir=${g_outputArchDir}/${g_libId}
if [[ ! -e ${g_outputLibDir} ]]; then
    mkdir -p ${g_outputLibDir}
fi

# 定义configure flag.
export g_flag=""
g_flag+=" --enable-strip"
g_flag+=" --enable-static"
if [[ "${g_configure}" == $COMPILE_MODE_DEBUG ]]; then
    g_flag+=" --enable-debug=alot"
else
    g_flag+=" --enable-debug=no"
fi
g_flag+=" --disable-cli"
# 指定主机架构
g_flag+=" --host=${g_host}"
# 指定输出目录
g_flag+=" --prefix=${g_outputLibDir}"

function doFinish() {
    echo "doFnish"
    unset doFinish
}
export doFinish